package cn.dkdoo.utils.entity;

import lombok.Data;

import java.io.Serializable;

/**
 * @author nicky
 * @date 2021/5/12 下午5:41
 */
@Data
public class BaseResponse implements Serializable {
    private static final long serialVersionUID = 1L;
    private String message;
    private Boolean success;
    private Object[] args;
    //@Since 02.12.16
    private String code;
    private Object data;

    public BaseResponse buildSuccess() {
        this.success = true;
        this.message = "成功";
        return this;
    }
    public void buildSuccess(String message) {
        this.success = true;
        this.message = message;
        this.code = "200";
    }
}
